import request from '@/utils/request'

export function getDeliveryTypeByPage(query) {
  return request({
    url: '/mall/api/manager/business/delivery-type',
    method: 'get',
    params: query
  })
}

export function addDeliveryType(data) {
  return request({
    url: '/mall/api/manager/business/delivery-type',
    method: 'post',
    data
  })
}

export function getDeliveryTypeById(id) {
  return request({
    url: '/mall/api/manager/business/delivery-type/' + id,
    method: 'get'
  })
}

export function putDeliveryTypeById(id, data) {
  return request({
    url: '/mall/api/manager/business/delivery-type/' + id,
    method: 'put',
    data
  })
}

export function deleteDeliveryTypeById(id) {
  return request({
    url: '/mall/api/manager/business/delivery-type/' + id,
    method: 'delete'
  })
}

export function getDeliveryChargeByPage(query) {
  return request({
    url: '/mall/api/manager/business/delivery-charge',
    method: 'get',
    params: query
  })
}

export function addDeliveryCharge(data) {
  return request({
    url: '/mall/api/manager/business/delivery-charge',
    method: 'post',
    data
  })
}

export function getDeliveryChargeById(id) {
  return request({
    url: '/mall/api/manager/business/delivery-charge/' + id,
    method: 'get'
  })
}

export function putDeliveryChargeById(id, data) {
  return request({
    url: '/mall/api/manager/business/delivery-charge/' + id,
    method: 'put',
    data
  })
}

export function deleteDeliveryChargeById(id) {
  return request({
    url: '/mall/api/manager/business/delivery-charge/' + id,
    method: 'delete'
  })
}

export function addBatchDeliveryCharge(data) {
  return request({
    url: '/mall/api/manager/business/delivery-charge/add-batch',
    method: 'post',
    data
  })
}

export function getBrandByPage(query) {
  return request({
    url: '/mall/api/manager/business/brand',
    method: 'get',
    params: query
  })
}

export function addBrand(data) {
  return request({
    url: '/mall/api/manager/business/brand',
    method: 'post',
    data
  })
}

export function getBrandById(id) {
  return request({
    url: '/mall/api/manager/business/brand/' + id,
    method: 'get'
  })
}

export function putBrandById(id, data) {
  return request({
    url: '/mall/api/manager/business/brand/' + id,
    method: 'put',
    data
  })
}

export function deleteBrandById(id) {
  return request({
    url: '/mall/api/manager/business/brand/' + id,
    method: 'delete'
  })
}
